﻿using Sasc.PV.BLL;
using Sasc.PV.Common;
using Sasc.PV.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Sasc.PV.Web
{
    public class PVPage : System.Web.UI.Page
    {
        #region Override
        protected override void OnLoad(EventArgs e)
        {
            Title = string.Format("{0}-{1}", WebUtils.SystemName, Title);
            base.OnLoad(e);
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            LoginUserName = PublicMethod.GetSessionValue("UserName");
        }
        #endregion

        #region Methods
        protected void WriteRiZhi(string logContent)
        {
            //写系统日志
            ERPRiZhi MyRiZhi = new ERPRiZhi();
            MyRiZhi.UserName = LoginUserName;
            MyRiZhi.DoSomething = logContent;
            MyRiZhi.IpStr =  Utils.GetIPAddress();
            MyRiZhi.Add();
        }
        #endregion

        #region Properties
        protected string LoginUserName { get; set; }
        #endregion
    }
}